package com.ruoyi.common.utils.app.msg;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

// 初始化，读取配置文件的用户密钥等
@Component
public class ConstantPropertiesUtils implements InitializingBean {

    public static String ACCESS_KEY_ID;
    public static String SECRECT;
    @Value("${aliyun.sms.accessKeyId}")
    private String accessKeyId;
    @Value("${aliyun.sms.secret}")
    private String secret;

    @Override
    public void afterPropertiesSet() throws Exception {
        ACCESS_KEY_ID = accessKeyId;
        SECRECT = secret;
    }
}

